[DOM/JS] display table in IE
Posted
by budzor
on Stack Overflow
See other posts from Stack Overflow
or by budzor
Published on 2010-03-14T11:58:15Z
Indexed on
2010/03/14
12:05 UTC
Read the original article
Hit count: 165
I have code like that:
var xPola = 10, //how many cols
yPola = 10, //how many cols
bokPola = 30, //size of cell
body = document.getElementsByTagName('body')[0];
var tablica = document.createElement('table');
body.appendChild(tablica);
for( var y = 0; y < yPola; y++ ) {
var rzad = document.createElement('tr');
tablica.appendChild(rzad);
for( var x = 0; x < xPola; x++ ) {
var pole = document.createElement('td');
pole.setAttribute('width', bokPola);
pole.setAttribute('height', bokPola);
rzad.appendChild(pole);
}
};
it works fine in FF, Chrome & Opera (it displays 10x10 table with 30px width&height rows). In IE nothing happens. I check in firebug lite and it is in HTML section, inside BODY tag but i see nothing. Whats wrong?
© Stack Overflow or respective owner